package com.salt.admin.api.utils;

import com.salt.admin.api.feign.client.TenantClient;
import com.salt.admin.api.model.MultiTenant;
import com.salt.admin.api.model.User;
import com.salt.common.utils.SpringContextHolder;

/**
 * @Description
 * @Author salt
 * @Date 2022/1/22
 * @Version 1.0.1
 */
public class TenantClientUtils {

    private static TenantClient tenantClient = SpringContextHolder.getBean(TenantClient.class);

    public static MultiTenant find(){
        return tenantClient.find();
    }

    public static MultiTenant findByUser(User user) {
        return tenantClient.findByUser(user);
    }
}
